#include "EventPoller.h"
#include "Game.h"
#include "PlayState.h"
#include "SplashState.h"

SplashState::SplashState()
{
	m_background.Load("Images/Main Menu Temp.png");
}

void SplashState::Draw()
{
	m_background.Draw(0, 0, Screen::Instance());
}

void SplashState::Update()
{

}

void SplashState::OnKeyBoardEvent(const SDL_KeyboardEvent& k)
{
 	if(k.keysym.sym == SDLK_p && k.state == SDL_PRESSED)
	{
		TheGame::Instance()->SetGameState(ThePlayState::Instance());
	}
	
	if(k.keysym.sym == SDLK_ESCAPE && k.state == SDL_PRESSED)
	{
		exit(0);
	}
}